﻿using System;
using System.Data.Entity;
using Gozib.Data.Model;

namespace Gozib.Data
{
  public class GozibDbContext : DbContext
  {
    public DbSet<BookingDetail> BookingDetails { get; set; }

    public GozibDbContext() : base("GozibDbContext")
    {
      Database.SetInitializer(new DatabaseInitialiser());
    }

    //We can override the OnModelCreating Method to provide the EF with extra information 
    //on how to construct the Database when using the Code First Approach

    protected override void OnModelCreating(DbModelBuilder modelBuilder)
    {
      //modelBuilder.Configurations.Add(new BlogConfiguration());
      //modelBuilder.Configurations.Add(new PostConfiguration());
      //modelBuilder.Configurations.Add(new CommentConfiguration());
    }
  }
}
